﻿Imports IRSO6.Login
Imports System.Net

Public Class Menu

    Inherits System.Web.UI.Page
    Public readerl2 As New List(Of Usuarios)
    Public listacli As New List(Of Clientes)

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim name
        Try
            name = Request.Item("usuario").ToString
        Catch ex As Exception
            Response.Redirect("/Login.aspx")
            Response.Write("Login Incorrecto")
        End Try

        If (Session.Item("usuario").ToString = name) Then
            txtNombre.Text = Request.Item("usuario").ToString
            readerl2 = Session("lista")
            ItemsGrid.DataSource = readerl2
            ItemsGrid.DataBind()
        Else

            Response.Redirect("/Login.aspx")
            Response.Write("Login Incorrecto")

        End If



    End Sub

    Protected Sub Unnamed1_Click(sender As Object, e As EventArgs)
        Session.Clear()
        Response.Redirect("/Login.aspx")
    End Sub

    

    Protected Sub CargarTicket_Click(sender As Object, e As EventArgs) Handles CargarTicket.Click
        Response.Redirect("/Ticket.aspx")
        End Sub
End Class